package it.afs.worklog.application;

import it.afs.worklog.User;

import org.apache.wicket.Request;
import org.apache.wicket.protocol.http.WebSession;

public class WorkLogSession extends WebSession
{
	private static final long serialVersionUID = -6457243459937043792L;
	
	private User loggedUser;

	public WorkLogSession(Request request)
	{
		super(request);
	}
	
	public static WorkLogSession getCurrentSession()
	{
		return (WorkLogSession)get();
	}

	public void setLoggedUser(User loggedUser) {
		this.loggedUser = loggedUser;
	}

	public User getLoggedUser() {
		return loggedUser;
	}
	
	public boolean isLoggedUser()
	{
		return getLoggedUser() != null;
	}
}